package site.marqstree.kotlin.library.good.ui.bean

import androidx.databinding.BaseObservable
import androidx.databinding.ObservableBoolean
import androidx.databinding.ObservableChar
import androidx.databinding.ObservableInt

data class GoodVOBean(
    val count: ObservableInt,
    val desc: String,
    val id: Int,
    val name: String,
    val price: Float,
    val sku: String,
    val thumb: String,
    var selected: ObservableBoolean = ObservableBoolean(false)
): BaseObservable(){
    constructor(goodbean:GoodBean): this(ObservableInt(goodbean.count),
                                            goodbean.desc,
                                            goodbean.id,
                                            goodbean.name,
                                            goodbean.price,
                                            goodbean.sku,
                                            goodbean.thumb,
                                            ObservableBoolean(goodbean.selected)
                                        )
}